﻿//4. Write a method that counts how many times given number appears in given array. Write a test program to check if the method is working correctly.


using System;
using System.Collections.Generic;

class NumberAppearsInArray
{
    static void Main()
    {
        int number = int.Parse(Console.ReadLine());
        int[] arr = {1, 4, 4, 2, 7, 7, 5, 9, 8, 3, 4, 7, 9, 4};
        Console.WriteLine(NumberInArray(arr, number));
    }
    static int NumberInArray(int[] arr, int number)
    {
        int counter = 0;
        for (int i = 0; i < arr.Length; i++)
        {
            if (number == arr[i])
            {
                counter++;
            }
        }
        return counter;
    }
}
